/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$(document).ready(function() 
{
    $('.sub-section span').mouseover
    (
        function() 
        {
            $(this).css("background-color", "#333333");
            $(this).css('cursor','pointer');
        }

    );
    $('.sub-section span').mouseout
    (
        function() 
        {
            $(this).css("background-color", "#0c0c0c");
        }
    );
    $('.sub-section span').click
    (
        function() 
        {
            $(this).parent().parent().submit();
        }
    );    
    $('.section-border img').mouseover
    (
        function()
        {
            $(this).css('cursor','pointer');
            $(this).attr("src", "Images/border2.png"); 
        }
    );
    $('.section-border img').mouseleave
    (
        function()
        {
            $(this).attr("src", "Images/border.png"); 
        }
    );
    $('.section-title span').mouseover
    (
        function()
        {
            $(this).css('cursor','pointer');
            $(this).parent().parent().children('.section-border').children('img').attr("src", "Images/border2.png");
        }
    );
    $('.section-title span').mouseleave
    (
        function()
        {
            $(this).parent().parent().children('.section-border').children('img').attr("src", "Images/border.png");
        }
    );
    $('.section-border img').click
    (
        function()
        {
            $(this).parent().parent().children('.sub-sections').fadeToggle("slow");
        }
    );
    $('.section-title span').click
    (
        function()
        {
            $(this).parent().parent().children('.sub-sections').fadeToggle("slow");
        }
    );
    $('.recent-message').mouseover
    (
        function() 
        {
            $(this).css('cursor','pointer');
            $(this).css("background-color", "#aaaaaa");
        }

    );
    $('.recent-message').mouseleave
    (
        function() 
        {
            $(this).css('cursor','pointer');
            $(this).css("background-color", "");
        }

    );
    $('.recent-message').click
    (
        function() 
        {
            $(this).children('form').submit();
        }
    );
   $('#navigation a').mouseover
    (
        function()
        {
            if($(this).attr("id")=="hover"){
                $(this).css("color","#4f0000");
                $('#hoverRoot').css("height",$(this).height());
                $('#hoverRoot').css("width",$(this).width());
                $('#hoverRoot').css("top",$(this).position().top);
                $('#hoverRoot').css("left",$(this).position().left);
                $('#hoverRoot').css("z-index","3");
                $('#hoverRoot').fadeIn("fast");
                $('#hoverBg').css("height",$(document).height());
                $('#hoverBg').css("width",$(document).width());
                $('#hoverBg').fadeIn("fast");
                $('#hoverBg').css("z-index","2");
            }
        }
    );
    $('#hoverBg').mouseover(
        function()
        {
            $('#hover').css("color","#ffffff");
            $('.hoverMenu').css("display","none");
            $('#hoverRoot').css("display","none");
            $('#hoverBg').css("z-index","-1");
            $('#hoverRoot').css("z-index","-1");
            $('#hoverBg').css("display","none");
        }
    );
    $('#hoverRoot').click(
        function()
        {
            $(this).children('form').submit();
        }
    );
});



